package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Member entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_MEMBER", schema = "HCD_DEV", uniqueConstraints = {
		@UniqueConstraint(columnNames = "EMAIL"), @UniqueConstraint(columnNames = "NAME"),
		@UniqueConstraint(columnNames = "MOBILE") })
public class Member extends Entity implements java.io.Serializable {

	// Fields

	private Long memberId;
	private Address address;
	private String name;
	private String password;
	private Integer passwordChecker;
	private Integer seed;
	private String realName;
	private String mobile;
	private String email;
	private Float balance;
	private String checkCode;
	private Integer pin;
	private Boolean pinLock;
	private Integer integral;
	private Integer sex;
	private Long regionId;
	private String street;
	private Integer shakeCount;
	private Long shakeTime;
	private Long birthday;
	private Float income;
	private Integer marriage;
	private String hobby;
	private Long loginTime;
	private Long registerTime;
	private Set<MemberVip> memberVips = new HashSet<MemberVip>(0);
	private Set<PrizeWin> prizeWins = new HashSet<PrizeWin>(0);
	private Set<CompanyMember> companyMembers = new HashSet<CompanyMember>(0);
	private Set<MemberPrepaid> memberPrepaidsForMemberId = new HashSet<MemberPrepaid>(0);
	private Set<Address> addresses = new HashSet<Address>(0);
	private Set<MemberPrepaid> memberPrepaidsForCheckerId = new HashSet<MemberPrepaid>(0);
	private Set<MemberNotice> memberNotices = new HashSet<MemberNotice>(0);
	private Set<MemberRole> memberRoles = new HashSet<MemberRole>(0);
	private Set<SecurityQuestion> securityQuestions = new HashSet<SecurityQuestion>(0);
	private Set<StoreMember> storeMembers = new HashSet<StoreMember>(0);
	private Set<ShoppingCart> shoppingCarts = new HashSet<ShoppingCart>(0);
	private Set<Order> ordersForCheckerId = new HashSet<Order>(0);
	private Set<Order> ordersForMemberId = new HashSet<Order>(0);
	private Set<LocalSale> localSales = new HashSet<LocalSale>(0);
	private Set<MemberSpend> memberSpends = new HashSet<MemberSpend>(0);

	// Constructors

	/** default constructor */
	public Member() {
	}

	/** minimal constructor */
	public Member(String name, String password, Integer passwordChecker, Integer seed,
			Float balance, String checkCode, Boolean pinLock, Integer integral, Integer sex,
			Long regionId, Integer shakeCount, Long shakeTime, Long birthday, Float income,
			Integer marriage, Long loginTime, Long registerTime) {
		this.name = name;
		this.password = password;
		this.passwordChecker = passwordChecker;
		this.seed = seed;
		this.balance = balance;
		this.checkCode = checkCode;
		this.pinLock = pinLock;
		this.integral = integral;
		this.sex = sex;
		this.regionId = regionId;
		this.shakeCount = shakeCount;
		this.shakeTime = shakeTime;
		this.birthday = birthday;
		this.income = income;
		this.marriage = marriage;
		this.loginTime = loginTime;
		this.registerTime = registerTime;
	}

	/** full constructor */
	public Member(Address address, String name, String password, Integer passwordChecker,
			Integer seed, String realName, String mobile, String email, Float balance,
			String checkCode, Integer pin, Boolean pinLock, Integer integral, Integer sex,
			Long regionId, String street, Integer shakeCount, Long shakeTime, Long birthday,
			Float income, Integer marriage, String hobby, Long loginTime, Long registerTime,
			Set<MemberVip> memberVips, Set<PrizeWin> prizeWins, Set<CompanyMember> companyMembers,
			Set<MemberPrepaid> memberPrepaidsForMemberId, Set<Address> addresses,
			Set<MemberPrepaid> memberPrepaidsForCheckerId, Set<MemberNotice> memberNotices,
			Set<MemberRole> memberRoles, Set<SecurityQuestion> securityQuestions,
			Set<StoreMember> storeMembers, Set<ShoppingCart> shoppingCarts,
			Set<Order> ordersForCheckerId, Set<Order> ordersForMemberId, Set<LocalSale> localSales,
			Set<MemberSpend> memberSpends) {
		this.address = address;
		this.name = name;
		this.password = password;
		this.passwordChecker = passwordChecker;
		this.seed = seed;
		this.realName = realName;
		this.mobile = mobile;
		this.email = email;
		this.balance = balance;
		this.checkCode = checkCode;
		this.pin = pin;
		this.pinLock = pinLock;
		this.integral = integral;
		this.sex = sex;
		this.regionId = regionId;
		this.street = street;
		this.shakeCount = shakeCount;
		this.shakeTime = shakeTime;
		this.birthday = birthday;
		this.income = income;
		this.marriage = marriage;
		this.hobby = hobby;
		this.loginTime = loginTime;
		this.registerTime = registerTime;
		this.memberVips = memberVips;
		this.prizeWins = prizeWins;
		this.companyMembers = companyMembers;
		this.memberPrepaidsForMemberId = memberPrepaidsForMemberId;
		this.addresses = addresses;
		this.memberPrepaidsForCheckerId = memberPrepaidsForCheckerId;
		this.memberNotices = memberNotices;
		this.memberRoles = memberRoles;
		this.securityQuestions = securityQuestions;
		this.storeMembers = storeMembers;
		this.shoppingCarts = shoppingCarts;
		this.ordersForCheckerId = ordersForCheckerId;
		this.ordersForMemberId = ordersForMemberId;
		this.localSales = localSales;
		this.memberSpends = memberSpends;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_MEMBER")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "MEMBER_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getMemberId() {
		return this.memberId;
	}

	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ADDRESS_ID")
	public Address getAddress() {
		return this.address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	@Column(name = "NAME", unique = true, nullable = false, length = 60)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "PASSWORD", nullable = false, length = 60)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "PASSWORD_CHECKER", nullable = false, precision = 2, scale = 0)
	public Integer getPasswordChecker() {
		return this.passwordChecker;
	}

	public void setPasswordChecker(Integer passwordChecker) {
		this.passwordChecker = passwordChecker;
	}

	@Column(name = "SEED", nullable = false, precision = 8, scale = 0)
	public Integer getSeed() {
		return this.seed;
	}

	public void setSeed(Integer seed) {
		this.seed = seed;
	}

	@Column(name = "REAL_NAME", length = 60)
	public String getRealName() {
		return this.realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	@Column(name = "MOBILE", unique = true, length = 15)
	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Column(name = "EMAIL", unique = true, length = 60)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "BALANCE", nullable = false, precision = 8)
	public Float getBalance() {
		return this.balance;
	}

	public void setBalance(Float balance) {
		this.balance = balance;
	}

	@Column(name = "CHECK_CODE", nullable = false, length = 100)
	public String getCheckCode() {
		return this.checkCode;
	}

	public void setCheckCode(String checkCode) {
		this.checkCode = checkCode;
	}

	@Column(name = "PIN", precision = 8, scale = 0)
	public Integer getPin() {
		return this.pin;
	}

	public void setPin(Integer pin) {
		this.pin = pin;
	}

	@Column(name = "PIN_LOCK", nullable = false, precision = 1, scale = 0)
	public Boolean getPinLock() {
		return this.pinLock;
	}

	public void setPinLock(Boolean pinLock) {
		this.pinLock = pinLock;
	}

	@Column(name = "INTEGRAL", nullable = false, precision = 8, scale = 0)
	public Integer getIntegral() {
		return this.integral;
	}

	public void setIntegral(Integer integral) {
		this.integral = integral;
	}

	@Column(name = "SEX", nullable = false, precision = 2, scale = 0)
	public Integer getSex() {
		return this.sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	@Column(name = "REGION_ID", nullable = false, precision = 15, scale = 0)
	public Long getRegionId() {
		return this.regionId;
	}

	public void setRegionId(Long regionId) {
		this.regionId = regionId;
	}

	@Column(name = "STREET", length = 250)
	public String getStreet() {
		return this.street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	@Column(name = "SHAKE_COUNT", nullable = false, precision = 8, scale = 0)
	public Integer getShakeCount() {
		return this.shakeCount;
	}

	public void setShakeCount(Integer shakeCount) {
		this.shakeCount = shakeCount;
	}

	@Column(name = "SHAKE_TIME", nullable = false, precision = 15, scale = 0)
	public Long getShakeTime() {
		return this.shakeTime;
	}

	public void setShakeTime(Long shakeTime) {
		this.shakeTime = shakeTime;
	}

	@Column(name = "BIRTHDAY", nullable = false, precision = 15, scale = 0)
	public Long getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Long birthday) {
		this.birthday = birthday;
	}

	@Column(name = "INCOME", nullable = false, precision = 8)
	public Float getIncome() {
		return this.income;
	}

	public void setIncome(Float income) {
		this.income = income;
	}

	@Column(name = "MARRIAGE", nullable = false, precision = 2, scale = 0)
	public Integer getMarriage() {
		return this.marriage;
	}

	public void setMarriage(Integer marriage) {
		this.marriage = marriage;
	}

	@Column(name = "HOBBY", length = 300)
	public String getHobby() {
		return this.hobby;
	}

	public void setHobby(String hobby) {
		this.hobby = hobby;
	}

	@Column(name = "LOGIN_TIME", nullable = false, precision = 15, scale = 0)
	public Long getLoginTime() {
		return this.loginTime;
	}

	public void setLoginTime(Long loginTime) {
		this.loginTime = loginTime;
	}

	@Column(name = "REGISTER_TIME", nullable = false, precision = 15, scale = 0)
	public Long getRegisterTime() {
		return this.registerTime;
	}

	public void setRegisterTime(Long registerTime) {
		this.registerTime = registerTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<MemberVip> getMemberVips() {
		return this.memberVips;
	}

	public void setMemberVips(Set<MemberVip> memberVips) {
		this.memberVips = memberVips;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<PrizeWin> getPrizeWins() {
		return this.prizeWins;
	}

	public void setPrizeWins(Set<PrizeWin> prizeWins) {
		this.prizeWins = prizeWins;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<CompanyMember> getCompanyMembers() {
		return this.companyMembers;
	}

	public void setCompanyMembers(Set<CompanyMember> companyMembers) {
		this.companyMembers = companyMembers;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "memberByMemberId")
	public Set<MemberPrepaid> getMemberPrepaidsForMemberId() {
		return this.memberPrepaidsForMemberId;
	}

	public void setMemberPrepaidsForMemberId(Set<MemberPrepaid> memberPrepaidsForMemberId) {
		this.memberPrepaidsForMemberId = memberPrepaidsForMemberId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<Address> getAddresses() {
		return this.addresses;
	}

	public void setAddresses(Set<Address> addresses) {
		this.addresses = addresses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "memberByCheckerId")
	public Set<MemberPrepaid> getMemberPrepaidsForCheckerId() {
		return this.memberPrepaidsForCheckerId;
	}

	public void setMemberPrepaidsForCheckerId(Set<MemberPrepaid> memberPrepaidsForCheckerId) {
		this.memberPrepaidsForCheckerId = memberPrepaidsForCheckerId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<MemberNotice> getMemberNotices() {
		return this.memberNotices;
	}

	public void setMemberNotices(Set<MemberNotice> memberNotices) {
		this.memberNotices = memberNotices;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<MemberRole> getMemberRoles() {
		return this.memberRoles;
	}

	public void setMemberRoles(Set<MemberRole> memberRoles) {
		this.memberRoles = memberRoles;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<SecurityQuestion> getSecurityQuestions() {
		return this.securityQuestions;
	}

	public void setSecurityQuestions(Set<SecurityQuestion> securityQuestions) {
		this.securityQuestions = securityQuestions;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<StoreMember> getStoreMembers() {
		return this.storeMembers;
	}

	public void setStoreMembers(Set<StoreMember> storeMembers) {
		this.storeMembers = storeMembers;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<ShoppingCart> getShoppingCarts() {
		return this.shoppingCarts;
	}

	public void setShoppingCarts(Set<ShoppingCart> shoppingCarts) {
		this.shoppingCarts = shoppingCarts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "memberByCheckerId")
	public Set<Order> getOrdersForCheckerId() {
		return this.ordersForCheckerId;
	}

	public void setOrdersForCheckerId(Set<Order> ordersForCheckerId) {
		this.ordersForCheckerId = ordersForCheckerId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "memberByMemberId")
	public Set<Order> getOrdersForMemberId() {
		return this.ordersForMemberId;
	}

	public void setOrdersForMemberId(Set<Order> ordersForMemberId) {
		this.ordersForMemberId = ordersForMemberId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<LocalSale> getLocalSales() {
		return this.localSales;
	}

	public void setLocalSales(Set<LocalSale> localSales) {
		this.localSales = localSales;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "member")
	public Set<MemberSpend> getMemberSpends() {
		return this.memberSpends;
	}

	public void setMemberSpends(Set<MemberSpend> memberSpends) {
		this.memberSpends = memberSpends;
	}

}